// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */

//门店审核
import storeAudit from '@/views/platform/storeAudit';
//服务项目管理
import serverManage from '@/views/platform/serverManage';
//电桩管理
import powerManage from '@/views/platform/powerManage';
//商城管理
import shoppingManage from '@/views/platform/shoppingManage';
//评论管理
import commentManage from '@/views/platform/commentManage';
//投诉管理
import complain from '@/views/platform/complain';
//门店管理
import storeManage from '@/views/platform/storeManage';
//门店收入
import storeIncome from '@/views/platform/storeIncome';
//订单管理
import orderManage from '@/views/platform/orderManage';
//消息服务
import messageManage from '@/views/platform/messageManage';
//营销管理
import marketingManage from '@/views/platform/marketingManage';

import evaluate from '@/views/platform/evaluate';
import service from '@/views/platform/service'
















// 商品管理
import Goods from '@/views/goods/Goods';
//我们自定义修改的页面
import mygoods from '@/views/goods/mygoods';
// 用户管理
import role from '@/views/goods/role';
// 账户管理
import manager from '@/views/goods/manager';
// 用户管理
import user1 from '@/views/goods/user1';
// 机器信息管理
import Machine from '@/views/machine/Machine';
// 货道信息管理
import MachineAisle from '@/views/machine/MachineAisle';
/**
 * 订单管理
 */
// 交易订单
import Order from '@/views/pay/Order';
/**
 * 系统管理
 */
// 菜单管理
import Module from '@/views/system/Module';
// 角色管理
import Role from '@/views/system/Role';
// 公司管理
import Dept from '@/views/system/Dept';
// 系统环境变量
import Variable from '@/views/system/Variable';
// 权限管理
import Permission from '@/views/system/Permission';
/**
 * 支付管理
 */
// 支付配置信息
import MachineConfig from '@/views/machine/MachineConfig';
// 支付配置
import Config from '@/views/pay/Config';
/**
 * 数据监控
 */
// 监控查询
import druidLogin from '@/views/druid/login';

// 图表界面
import statistics from '@/views/charts/statistics';

// 启用路由
Vue.use(Router);

// 导出路由
export default new Router({
  routes: [{
    path: '/',
    name: '',
    component: login,
    hidden: true,
    meta: {
      requireAuth: false
    }
  }, {
    path: '/login',
    name: '登录',
    component: login,
    hidden: true,
    meta: {
      requireAuth: false
    }
  }, {
    path: '/index',
    name: '首页',
    component: index,
    iconCls: 'el-icon-tickets',
    children: [{
      path: '/goods/Goods',
      name: '商品管理',
      component: Goods,
      meta: {
        requireAuth: true
      }
    },{
      path: '/platform/storeAudit',
      name: 'storeAudit',
      component: storeAudit,
      meta: {
        requireAuth: true
      }
    },{
      path: '/platform/serverManage',
      name: 'serverManage',
      component: serverManage,
      meta: {
        requireAuth: true
      }
    }, 
    {
      path: '/platform/powerManage',
      name: 'powerManage',
      component: powerManage,
      meta: {
        requireAuth: true
      }
    },
    {
      path: '/platform/shoppingManage',
      name: 'shoppingManage',
      component: shoppingManage,
      meta: {
        requireAuth: true
      }
    },{
      path: '/platform/commentManage',
      name: 'commentManage',
      component: commentManage,
      meta: {
        requireAuth: true
      }
    },{
      path: '/platform/complain',
      name: 'complain',
      component: complain,
      meta: {
        requireAuth: true
      }
    },{
      path: '/platform/storeManage',
      name: 'storeManage',
      component: storeManage,
      meta: {
        requireAuth: true
      }
    },
    {
      path: '/platform/storeIncome',
      name: 'storeIncome',
      component: storeIncome,
      meta: {
        requireAuth: true
      }
    },{
      path: '/platform/orderManage',
      name: 'orderManage',
      component: orderManage,
      meta: {
        requireAuth: true
      }
    },{
      path: '/platform/messageManage',
      name: 'messageManage',
      component: messageManage,
      meta: {
        requireAuth: true
      }
    },{
      path: '/platform/marketingManage',
      name: 'marketingManage',
      component: marketingManage,
      meta: {
        requireAuth: true
      }
    },{
      path: '/platform/evaluate',
      name: 'evaluate',
      component: evaluate,
      meta: {
        requireAuth: true
      }
    },{
      path: '/platform/service',
      name: 'service',
      component: service,
      meta: {
        requireAuth: true
      }
    },


















    
    {
      path: '/goods/mygoods',
      name: 'mygoods',
      component: mygoods,
      meta: {
        requireAuth: true
      }
    },
      {
        path: '/goods/manager',
        name: 'manager',
        component: manager,
        meta: {
          requireAuth: true
        }
      },
      {
        path: '/goods/user1',
        name: 'user1',
        component: user1,
        meta: {
          requireAuth: true
        }
      },
      {
        path: '/goods/role',
        name: 'role',
        component: role,
        meta: {
          requireAuth: true
        }
      }, {
        path: '/machine/Machine',
        name: '机器信息管理',
        component: Machine,
        meta: {
          requireAuth: true
        }
      }, {
        path: '/machine/MachineAisle',
        name: '货道信息管理',
        component: MachineAisle,
        meta: {
          requireAuth: true
        }
      }, {
        path: '/pay/Order',
        name: '交易订单',
        component: Order,
        meta: {
          requireAuth: true
        }
      }, {
        path: '/system/Module',
        name: '菜单管理',
        component: Module,
        meta: {
          requireAuth: true
        }
      }, {
        path: '/system/Role',
        name: '角色管理',
        component: Role,
        meta: {
          requireAuth: true
        }
      }, {
        path: '/system/Dept',
        name: '公司管理',
        component: Dept,
        meta: {
          requireAuth: true
        }
      }, {
        path: '/system/Variable',
        name: '系统环境变量',
        component: Variable,
        meta: {
          requireAuth: true
        }
      }, {
        path: '/system/Permission',
        name: '权限管理',
        component: Permission,
        meta: {
          requireAuth: true
        }
      }, {
        path: '/machine/MachineConfig',
        name: '支付配置信息',
        component: MachineConfig,
        meta: {
          requireAuth: true
        }
      }, {
        path: '/pay/Config',
        name: '支付配置',
        component: Config,
        meta: {
          requireAuth: true
        }
      }, {
        path: '/druid/login',
        name: '监控查询',
        component: druidLogin,
        meta: {
          requireAuth: true
        }
      }, {
        path: '/charts/statistics',
        name: '数据可视化',
        component: statistics,
        meta: {
          requireAuth: true
        }
      }]
  }]
})
